<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<title>Document</title>
	<style>
		li:first-child {
			color: red;
		}

		li:last-child {
			color: blue;
		}

		li:nth-child(3) {
			color: orange;
		}

		li:nth-last-child(2) {
			color: chartreuse;
		}
	</style>
</head>
<body>
	<ul>
		<li>第一个子元素</li>
		<li>第二个子元素</li>
		<li>第三个子元素</li>
		<li>第四个子元素</li>
		<li>第五个子元素</li>
		<li>第六个子元素</li>
		<li>第七个子元素</li>
	</ul>
</body>
</html>